//
//  NewsCellVM.m
//  iOS实战
//
//  Created by clz on 2019/10/27.
//  Copyright © 2019 clz. All rights reserved.
//

#import "NewsCellVM.h"
#import "NSObject+CommonTool.h"


@implementation NewsCellVM

- (void)setModel:(NewsModel *)model{
    self.coverImg = model.coverImg;
    self.title = model.title;
    self.publicTime = model.publicTime;
    
    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
    [formatter setDateFormat:@"yyyy-MM-dd"];
    
    self.dateStr = [self getDateStrWithTimeStamp:self.publicTime.doubleValue formatter:formatter];
}

@end
